<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" type="text/css" href="layui/css/layui.css"/>
    <script src="jquery-2.1.4.js" type="text/javascript" charset="utf-8"></script>
    <script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
    <script src="mylayer.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<button onclick="onMyLayer()">测试MyLayer</button>

<script>
    function onMyLayer() {
        //mylayer.alert('这是一个验证的警告!');
        //mylayer.confirm('您确认要删除么?', 'http://www.baidu.com');
        //mylayer.okMsg('删除成功');
        //mylayer.errorMsg('删除失败');
        mylayer.okUrl('删除成功', 'http://www.baidu.com');
    }
</script>
</body>
</html>